<script type="text/javascript" src="__PUBLIC__/Js/jgsat.js"></script>
<div id="msg"></div>
<form name="myform" id="myform" action="<if condition="$action_name=='add'">{:U($module_name.'/insert')}<else />{:U($module_name.'/update')}</if>&iscreatehtml=1" method="post">
  <div id="filelist" class="hide"></div>
  <div class="error">
    <ul>
    </ul>
  </div>
  <table cellpadding=0 cellspacing=0 class="table_form" width="100%">
    {if $vo['sjsname']} <tr>
          <td width="8%" >预约的设计师：</td>
          <td width="90%" id="box_title">{$vo['sjsname']}</td>
        </tr> 
    {/if}
  
    <tr>
      <td width="8%" >业主姓名：</td>
      <td width="90%" id="box_title"><input type="text" name="title" class="input-text " value="{$vo['title']}" size=""  validate=" required:true" /></td>
      <input type="hidden" name="catid" value="5" size="" />
    </tr>

    <tr>
        <td width="8%">电话：</td>
        <td width="90%" id="box_telephone">
        <input type="text"   class="input-text " name="telephone" value="{$vo['telephone']}" size=""  validate=" required:true" />    
        </td>
    </tr>
    <tr>
			<td>省市</td>
			<td>
                     <select class="wz_r2" name="bprovince" id="bprovince" onchange="area_change(this.value, 1,'bprovince','bcity','barea');" class="selt mr5" >
                       <option value="0">省份</option>
                     </select>
                     <select class="wz_r2" name="bcity" onchange="area_change(this.value, 2,'bprovince','bcity','barea');" id="bcity" class="selt mr5" >
                         <option value="0">城市</option>
                     </select>
                     
                       <script>area_change(0, 0,'bprovince','bcity','barea',{if $vo[bprovince]!=0}{$vo[bprovince]}{else}0{/if},{if $vo[bcity]!=0}{$vo[bcity]}{else}0{/if},{if $vo[barea]!=0}{$vo[barea]}{else}0{/if});</script>
                 </script>     
            </td>
		</tr>
    <tr>
        <td width="8%">项目类型</td>
        <td width="90%" >
		   <select name="itemType">
		      <YP:list name="Label" where="genre=17"  id="r" order="listorder asc" limit="50">
		        <option value="{$r['title']}" {if $r['title']==$vo['itemType'] }selected="selected"{/if}>{$r['title']}</option>
			 </YP:list>
			<select>
		</td>
    </tr>
     <tr>
        <td width="8%">项目面积</td>
        <td width="90%" >
            <select  name="itemArea">
		      <YP:list name="Label" where="genre=18"  id="r" >
		        <option value="{$r['title']}" {if $r['title']==$vo['itemArea'] }selected="selected"{/if}>{$r['title']}</option>
			  </YP:list>
			<select>
           </td>
    </tr>
     <tr>
        <td width="8%">项目预算</td>
        <td width="90%" >
           <select name="budget">
		      <YP:list name="Label" where="genre=19"  id="r" >
		        <option value="{$r['title']}" {if $r['title']==$vo['budget'] }selected="selected"{/if}>{$r['title']}</option>
			  </YP:list>
			<select>
        
        
        </td>
    </tr>
     <tr>
        <td width="8%">方便联系时间 ：</td>
        <td width="90%" > 
        		 
                  <select id="time_up" name="time_up" >
					  <option value="0">请选择</option>
					  {php for($i=8;$i<=21;$i++):}
					  <option value="{$i}"  {if $i==$vo['time_up'] }selected="selected"{/if}>{$i}:00</option>
					  {php endfor; }
					  </select>
					  <span>至</span>
					  <select id="time_mp" name="time_mp" >
					  <option value="0">请选择</option>
                      {php for($i=8;$i<=21;$i++):}
                      <option value="{$i}"  {if $vo['time_mp']}selected="selected"{/if}>{$i}:00</option>
                      {php endfor; }
					  </select>
        </td>
    </tr>
    
    <tr>
		<td width="10%">关键词 </td>
		<td width="90%" id="box_keywords">
		<input type="text" class="input-text " name="keywords" id="keywords" value="{$vo['keywords']}" size="55" validate=" maxlength:80"> 					        </td>
   </tr>
   
   <tr>
	<td width="10%">SEO简介 </td>
	<td width="90%" id="box_description">
	<textarea class="" name="description" rows="4" cols="55" id="description">{$vo['description']}</textarea></td>
	</tr>
    

     <tr>
        <td width="8%">备注：</td>
        <td width="90%" > 
        		  <textarea name="content" id="" cols="40" rows="10">{$vo['content']}</textarea>
        </td>
    </tr>
    <tr>
      <td width="8%" ><font color="red">*</font>发布时间：</td>
      <td width="90%" id="box_createtime"><input  class="Wdate input-text  "  validate=" required:true"   name="createtime" type="text" id="createtime" size="25" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'
		})" value="{if $vo['createtime']}{$vo['createtime']|todate}{else}{:date("Y-m-d h:i:s")}{/if}" /></td>
    </tr>

    <tr>
      <td width="10%" >状态</td>
      <td width="90%" id="box_status"><label style="float:left;width:75px" class="checkbox_status" >
	   {if $vo[status]!=0}已审核{/if}
          </label>
        <label style="float:left;width:75px" class="checkbox_status" >
          {if $vo[status]==0}未审核{/if} 
          </label>
          </td>
    </tr>
  </table>
  <div id="bootline"></div>
  <div id="btnbox" class="btn">
    <if condition="$vo['id']!=''">
      <input TYPE="hidden" name="id" value="{$vo.id}">
    </if>
    <input type="hidden"  name="lang" value="{$langid}" />
    <input type="hidden" name="forward" value="{$_SERVER['HTTP_REFERER']}" />
    <INPUT TYPE="submit"  value="{:L('dosubmit')}" class="button" >
    <input TYPE="reset"  value="{:L('cancel')}" class="button">
  </div>
</form>
</div>
<script>
$('#time_up').change(function(){ 
	  var t=$("#time_up").val();  //时间
	  var l=22-t;
	  var i=1;
	  var html='';
	  
	  for(i=1;i<=l;i++){
		  var n=parseInt(t)+parseInt(i);
		  html+='<option value="'+n+'">'+ n +':00</option>';
		  }
		 $("#time_mp").html(html);   
	})


</script>                                                                        